Phalcon\Test\Unit\Mvc\ModelTest::testBehaviorsSoftDelete PHP Method

testBehaviorsSoftDelete() public method

    public function testBehaviorsSoftDelete()
    {
        $this->specify("Soft Delete model behavior doesn't work", function () {
            $number = \Phalcon\Test\Models\News\Subscribers::count();
            $subscriber = \Phalcon\Test\Models\News\Subscribers::findFirst();
            expect($subscriber->delete())->true();
            expect($subscriber->status)->equals('D');
            expect(\Phalcon\Test\Models\News\Subscribers::count())->equals($number);
        });
    }