Exemple #1
0
 public function testItem()
 {
     $source = new MockSource();
     $entity = $source->item('Foo', array('foo' => 'bar'));
     $this->assertTrue($entity instanceof Entity);
     $this->assertEqual('Foo', $entity->model());
     $this->assertEqual(array('foo' => 'bar'), $entity->data());
 }
Exemple #2
0
 public function testItem()
 {
     $source = new MockSource();
     $entity = $source->item('lithium\\tests\\mocks\\data\\MockPost', array('foo' => 'bar'));
     $this->assertInstanceOf('lithium\\data\\Entity', $entity);
     $this->assertEqual('lithium\\tests\\mocks\\data\\MockPost', $entity->model());
     $this->assertEqual(array('foo' => 'bar'), $entity->data());
 }