Example #1
0
 public function testBehaviorsSoftDelete()
 {
     $this->_prepareDI();
     $number = News\Subscribers::count();
     $subscriber = News\Subscribers::findFirst();
     $this->assertTrue($subscriber->delete());
     $this->assertEquals($subscriber->status, 'D');
     $this->assertEquals(News\Subscribers::count(), $number);
 }
Example #2
0
 public function testBehaviorsSoftDelete()
 {
     require 'unit-tests/config.db.php';
     if (empty($configMysql)) {
         $this->markTestSkipped("Test skipped");
         return;
     }
     $this->_prepareDI();
     $number = News\Subscribers::count();
     $subscriber = News\Subscribers::findFirst();
     $this->assertTrue($subscriber->delete());
     $this->assertEquals($subscriber->status, 'D');
     $this->assertEquals(News\Subscribers::count(), $number);
 }