Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [RuntimeException] Call to undefined method UnitTester::haveRecord
- <?php namespace Article;
- use AppArticle;
- use FakerFactory as Faker;
- use CarbonCarbon;
- class SaveTest extends CodeceptionTestUnit
- {
- /**
- * @var UnitTester
- */
- protected $tester;
- protected function _before()
- {
- }
- protected function _after()
- {
- }
- // tests
- public function testSomeFeature()
- {
- $faker= Faker::create('App/Article');
- $title = $faker->sentence;
- $content = implode($faker->paragraphs(5));
- $created_at = Carbon::now();
- $updated_at = Carbon::now();
- $this->tester->haveRecord( 'Article', ['title' => $title, 'content' => $content,'created_at' => $created_at,'updated_at' => $updated_at]);
- $this->tester->seeRecord('articles',['title' => $title,'content' => $content,'created_at' => $created_at,'updated_at' => $updated_at]);
- }
- }
- actor: UnitTester
- modules:
- enabled:
- - Asserts
- - Laravel5:
- part: ORM
- - HelperUnit
Add Comment
Please, Sign In to add comment