RedUNIT\Base\Bean::testDeleteViaSharedListWithEmptyArray PHP Метод

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

You CAN delete a shared-list by assiging an empty array.
public testDeleteViaSharedListWithEmptyArray ( ) : void
Результат void
    public function testDeleteViaSharedListWithEmptyArray()
    {
        $book = $this->_createBook();
        asrt(isset($book->via('connection')->sharedUser), FALSE);
        //not loaded yet, lazy loading
        asrt(count($book->via('connection')->sharedUser), 1);
        //when loaded has 2
        $book->via('connection')->sharedUser = array();
        //remove all
        R::store($book);
        asrt(isset($book->via('connection')->sharedUser), FALSE);
        //not loaded yet, lazy loading
        asrt(count($book->via('connection')->sharedUser), 0);
    }