本文整理汇总了PHP中UnitTester::dontSeeRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP UnitTester::dontSeeRecord方法的具体用法?PHP UnitTester::dontSeeRecord怎么用?PHP UnitTester::dontSeeRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitTester
的用法示例。
在下文中一共展示了UnitTester::dontSeeRecord方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRoleCanBeDeleted
public function testRoleCanBeDeleted()
{
$id = $this->tester->haveRecord('roles', ['role_name' => 'user']);
$role = \ChopBox\Role::find($id);
$role->delete();
$this->tester->dontSeeRecord('roles', ['role_name' => 'user']);
}
示例2: testUploadCanBeDeleted
public function testUploadCanBeDeleted()
{
$chops_id = $this->createChops();
$id = $this->tester->haveRecord('uploads', ['chops_id' => $chops_id, 'mime_type' => 'image/jpg', 'file_uri' => 'bla', 'name' => 'a name']);
$upload = \ChopBox\Upload::find($id);
$upload->delete();
$this->tester->dontSeeRecord('uploads', ['name' => 'a name']);
}
示例3: testChopsCanBeUnfavourited
public function testChopsCanBeUnfavourited()
{
$chops_id = $this->createChops();
$id = $this->tester->haveRecord('favourites', ['chops_id' => $chops_id]);
$favourite = \ChopBox\Favourite::find($id);
$favourite->delete();
$this->tester->dontSeeRecord('favourites', ['chops_id' => $chops_id]);
}
示例4: testCommentCanBeDeleted
public function testCommentCanBeDeleted()
{
$chops_id = $this->createChops();
$chops = \ChopBox\Chop::find($chops_id);
$id = $this->tester->haveRecord('comments', ['comment' => "this comment has to be deleted", 'user_id' => $chops->user_id, 'chops_id' => $chops->id]);
$comment = \ChopBox\Comment::find($id);
$comment->delete();
$this->tester->dontSeeRecord('comments', ['comment' => 'this comment has to be deleted']);
}
示例5: testChopsCanBeUpdated
public function testChopsCanBeUpdated()
{
$id = $this->createChops();
$chops = Chop::find($id);
$chops->chops_name = "A new name";
$chops->save();
$this->tester->seeRecord('chops', ['chops_name' => 'A new name']);
$this->tester->dontSeeRecord('chops', ['chops_name' => 'Random name']);
}
示例6: testCompleteRemovingFromDatabase
public function testCompleteRemovingFromDatabase()
{
$pm = $this->create();
$pm->delete();
// jeden rekord powinien byc w bazie danych...
$this->tester->seeRecord('pm_text', ['id' => $pm->text_id]);
Pm::where('root_id', $pm->root_id)->delete();
$this->tester->dontSeeRecord('pm_text', ['id' => $pm->text_id]);
}
示例7: testAlertDelete
public function testAlertDelete()
{
$alert = $this->create();
$alert->delete();
$user = $this->tester->grabRecord('users', ['id' => $this->user->id]);
$this->assertEquals(0, $user->alerts);
$this->assertEquals(0, $user->alerts_unread);
$this->tester->dontSeeRecord('alerts', ['object_id' => $alert->object_id]);
}
示例8: testTopicMove
public function testTopicMove()
{
$fake = Factory::create();
$topic = $this->create();
$this->assertEquals(1, $this->tester->grabRecord('forums', ['id' => $this->forum->id])->topics);
$newForum = Forum::create(['name' => $fake->name, 'path' => $fake->name, 'description' => 'Lorem ipsum']);
$topic->forum_id = $newForum->id;
$topic->save();
$this->assertEquals(1, $this->tester->grabRecord('forums', ['id' => $newForum->id])->topics);
$this->tester->dontSeeRecord('posts', ['forum_id' => $this->forum->id]);
}