array( array( 'id' => 1 ) ), 'indices' => array( array( 'subject' => 1, 'predicate' => 'id', 'value' => 'https://example.com/notes/1', 'object' => null, ), array( 'subject' => 1, 'predicate' => 'type', 'value' => 'Note', 'object' => null, ), array( 'subject' => 1, 'predicate' => 'content', 'value' => 'This is a note', 'object' => null, ), ), ) ); } protected function setUp() { parent::setUp(); $dbConfig = Setup::createAnnotationMetadataConfiguration( array( __DIR__ . '/../src/Entities' ), true ); $namingStrategy = new PrefixNamingStrategy( '' ); $dbConfig->setNamingStrategy( $namingStrategy ); $dbParams = array( 'driver' => 'pdo_sqlite', 'path' => __DIR__ . '/db.sqlite', ); $this->entityManager = EntityManager::create( $dbParams, $dbConfig ); $this->objectsService = new ObjectsService( $this->entityManager ); } public function testItCreatesObject() { $fields = array( 'id' => 'https://example.com/notes/1', 'type' => 'Note', 'content' => 'This is a note', ); $objectEntity = $this->objectsService->createObject( $fields ); $queryTable = $this->getConnection()->createQueryTable( 'objects', 'SELECT * FROM objects' ); $expectedTable = $this->getDataSet()->getTable('objects'); $this->assertTablesEqual( $expectedTable, $queryTable ); } } ?>