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

testShouldCreateDocument() public method

Tests Collection::create
Since: 2016-03-13
Author: Serghei Iakovlev ([email protected])
    public function testShouldCreateDocument()
    {
        $this->specify("Collection::create does not work correctly", function () {
            $song = new Songs();
            $song->artist = 'Cinema Strange';
            $song->name = 'Greensward Grey';
            expect($song->create())->true();
            expect(Songs::count())->equals(4);
        });
    }