public function testGetById() { $layout = self::createBasicModel(); $res = $layout->save(); if (!$res) { print_r($layout->getErrors()); $this->assertTrue(false); } self::$layoutId = $layout->id; try { MailtankLayout::findByPk($layout->id); } catch (MailtankException $e) { $this->clearUnusedData(); return; } $this->fail('Layout cant be retrieved by id'); $this->clearUnusedData(); }