RedUNIT\Sqlite\Writer::testVaria2 PHP Метод

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

Test various somewhat uncommon trash/unassociate scenarios. (i.e. unassociate unrelated beans, trash non-persistant beans etc). Should be handled gracefully - no output checking.
public testVaria2 ( ) : void
Результат void
    public function testVaria2()
    {
        $toolbox = R::getToolBox();
        $redbean = $toolbox->getRedBean();
        $a = new AssociationManager($toolbox);
        $book = $redbean->dispense("book");
        $author1 = $redbean->dispense("author");
        $author2 = $redbean->dispense("author");
        $book->title = "My First Post";
        $author1->name = "Derek";
        $author2->name = "Whoever";
        $a->unassociate($book, $author1);
        $a->unassociate($book, $author2);
        pass();
        $redbean->trash($redbean->dispense("bla"));
        pass();
        $bean = $redbean->dispense("bla");
        $bean->name = 1;
        $bean->id = 2;
        $redbean->trash($bean);
        pass();
    }