Note that there are some explanatory texts on larger screens.

plurals
  1. POLaravel Testing with assertTrue method error on simple test
    primarykey
    data
    text
    <p>Im trying to do a real simple test going with Laravel 4 but getting errors.</p> <p>Here is my super simple test.</p> <pre><code>class SignupTest extends TestCase { public function testIndex() { $this-&gt;call('GET', '/'); $this-&gt;assertResponseOk(); } } </code></pre> <p>Error Stack Trace</p> <pre><code>PHP Fatal error: Call to undefined method SignupTest::assertTrue() in /home/domain/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php on line 135 PHP Stack trace: PHP 1. {main}() /home/domain/vendor/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /home/domain/vendor/bin/phpunit:63 PHP 3. PHPUnit_TextUI_Command-&gt;run() /home/domain/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129 PHP 4. PHPUnit_TextUI_TestRunner-&gt;doRun() /home/domain/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:176 PHP 5. PHPUnit_Framework_TestSuite-&gt;run() /home/domain/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349 PHP 6. PHPUnit_Framework_TestSuite-&gt;runTest() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:745 PHP 7. PHPUnit_Framework_TestCase-&gt;run() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:775 PHP 8. PHPUnit_Framework_TestResult-&gt;run() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:783 PHP 9. PHPUnit_Framework_TestCase-&gt;runBare() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648 PHP 10. PHPUnit_Framework_TestCase-&gt;runTest() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:838 PHP 11. ReflectionMethod-&gt;invokeArgs() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983 PHP 12. SignupTest-&gt;testIndex() /home/domain/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983 PHP 13. Illuminate\Foundation\Testing\TestCase-&gt;assertResponseOk() /home/domain/app/tests/Unit/Controllers/SignupTest.php:9 </code></pre> <p>You can see I'm extending the TestCase so I should have access to the assertTrue method.</p> <p>Composer Part Incase it help.s</p> <pre><code>"require-dev": { "phpunit/phpunit": "3.7.*", "way/laravel-test-helpers": "dev-master", "fzaninotto/faker": "dev-master", "mockery/mockery": "dev-master@dev" }, </code></pre> <p>I have dumped autoload and cleared compiled.</p> <p>Hope you can advise.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload