/** * Contains assertions to make about the results of the system test * * @param array $model Resulting model from system test */ protected function assertSystem(Model $model) { $this->assertEquals('CaseHistoryModel', $model->getStructure()->getName()); $this->assertEquals(2351, $model->get('id')); $this->assertTrue($model->hasLink('self')); $this->assertContains(2441978, $model->getPath('changes/*/to')); $this->assertInstanceOf('\\DateTime', $model->get('created_at')); }
/** * @covers Desk\Relationship\Resource\Model::hasLink */ public function testHasLinkFalse() { $links = array('foo' => 'bar'); $model = new Model(array('_links' => $links)); $result = $model->hasLink('baz'); $this->assertFalse($result); }