/** * @return void */ public function _testSaveYearArray() { $data = ['name' => 'Foo', 'year_of_birth' => ['day' => '1', 'month' => '12', 'year' => '2015']]; $entity = $this->Table->newEntity($data); $result = $this->Table->save($entity); $this->assertTrue((bool) $result); $record = $this->Table->get($entity->id); debug($record); }
/** * ShimModelTest::testGetFail() * * @expectedException \Cake\Datasource\Exception\RecordNotFoundException * @return void */ public function testGetFail() { $this->Posts->get(2222); }