Changeset 622 for trunk/tests
- Timestamp:
- Feb 15, 2018 12:31:38 PM (6 years ago)
- Location:
- trunk/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/EmailTest.php
r468 r622 5 5 * For details visit the project site: <http://trac.strangecode.com/codebase/> 6 6 * Copyright 2001-2012 Strangecode, LLC 7 * 7 * 8 8 * This file is part of The Strangecode Codebase. 9 9 * … … 12 12 * Free Software Foundation, either version 3 of the License, or (at your option) 13 13 * any later version. 14 * 14 * 15 15 * The Strangecode Codebase is distributed in the hope that it will be useful, but 16 16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 18 * details. 19 * 19 * 20 20 * You should have received a copy of the GNU General Public License along with 21 21 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 83 83 // } 84 84 // 85 // function testsend() 86 // { 87 // $result = $this->Email->send(PARAM); 88 // $expected = EXPECTED_VAL; 89 // $this->assertEquals($expected, $result); 90 // } 85 function testsend() 86 { 87 88 $this->Email = new Email(array( 89 'to' => 'Rob Recipient <to@example.com>', 90 'from' => 'Sam Sender <from@example.com>', 91 'subject' => 'EmailTest', 92 'headers' => array( 93 'CC' => 'This header removed in REDIRECT sandbox mode <remove-me@example.com>', 94 'X-Hello' => 'Hi there', 95 ), 96 'sandbox_mode' => Email::SANDBOX_MODE_REDIRECT, 97 'sandbox_to_addr' => 'quinn@strangecode.com', 98 )); 99 $this->Email->setString('This is a {TEST}'); 100 $this->Email->replace(array( 101 'test' => 'â you guessed it â a test!' 102 )); 103 $result = $this->Email->send(); 104 $expected = true; 105 $this->assertEquals($expected, $result); 106 } 91 107 92 108 function testvalidemail() -
trunk/tests/run_tests.sh
r602 r622 38 38 # Config options go in phpunit.xml 39 39 # phpunit --tap | grep -v '^ok ' 40 phpunit --stderr || err "\nSomething went wrong (code $?). If there is no output above, check the php_error_log";40 ../vendor/phpunit/phpunit/composer/bin/phpunit --stderr || err "\nSomething went wrong (code $?). If there is no output above, check the php_error_log"; 41 41
Note: See TracChangeset
for help on using the changeset viewer.