public function testPassesParametersToTheQuery() { $entityDefinitionCreator = new EntityDefinitionCreator(new ToUnderscores()); $parameters = array(':field' => 2); $this->queryAdapter->executeQuery(StubDatabaseAdapter::ENTITY_WITH_SINGLE_FIELD, $entityDefinitionCreator->create(EntityWithSingleString::class), $parameters); $this->assertEquals($parameters, $this->dbAdapter->getLastQueryParameters()); }
public function testeMapsComplexGetterOntoFieldName() { $this->mapper->map(['some_complex_field' => 'aaa'], $this->definitionCreator->create(EntityWithComplexFieldName::class)); }
public function testMethodsThatNamesDontStartWithGetAreIgnored() { $definition = $this->definitionCreator->create(EntityWithMethod::class); $expectedDefinition = new EntityDefinition(EntityWithMethod::class); $this->assertEquals($expectedDefinition, $definition); }