Phactory\Mongo\PhactoryTest::testRecall PHP Метод

testRecall() публичный Метод

public testRecall ( )
    public function testRecall()
    {
        $name = 'testuser';
        // define and create user in db
        $this->phactory->define('user', array('name' => $name));
        $user = $this->phactory->create('user');
        // recall() deletes from the db
        $this->phactory->recall();
        // test that the object is gone from the db
        $db_user = $this->db->users->findOne();
        $this->assertNull($db_user);
        // test that the blueprints weren't destroyed too
        $user = $this->phactory->create('user');
        $this->assertEquals($user['name'], $name);
    }