Phalcon\Test\Unit\Mvc\CollectionTest::testShouldUpdateDocument PHP Method

testShouldUpdateDocument() public method

    public function testShouldUpdateDocument()
    {
        $this->specify("Collection::update does not work correctly", function () {
            $song = new Songs();
            $song->artist = 'Cinema Strange';
            $song->name = 'Hebenon Vial';
            $song->create();
            $song->name = "Lindsey's Trachea";
            expect($song->update())->true();
            expect(Songs::count())->equals(6);
            expect(Songs::count([['name' => 'Hebenon Vial']]))->equals(0);
        });
    }