Exemplo n.º 1
0
 public function testMetaInformation()
 {
     $expected = array('class' => 'lithium\\tests\\mocks\\data\\MockPost', 'name' => 'MockPost', 'key' => 'id', 'title' => 'title', 'source' => 'mock_posts', 'connection' => 'mock-source', 'initialized' => true);
     MockPost::__init();
     $this->assertEqual($expected, MockPost::meta());
     $expected = array('class' => 'lithium\\tests\\mocks\\data\\MockComment', 'name' => 'MockComment', 'key' => 'comment_id', 'title' => 'comment_id', 'source' => 'mock_comments', 'connection' => 'mock-source', 'initialized' => true);
     $this->assertEqual($expected, MockComment::meta());
     $expected += array('foo' => 'bar');
     $this->assertEqual($expected, MockComment::meta('foo', 'bar'));
     $expected += array('bar' => true, 'baz' => false);
     $this->assertEqual($expected, MockComment::meta(array('bar' => true, 'baz' => false)));
 }