diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index 4f7deff..0d77745 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -927,85 +927,7 @@ public function testGetTableMappingRevisionableTranslatableWithFields(array $ent } /** - * Tests field SQL schema generation for an entity with a string identifier. - * - * @covers ::_fieldSqlSchema - */ - public function testFieldSqlSchemaForEntityWithStringIdentifier() { - $field_type_manager = $this->getMock('Drupal\Core\Field\FieldTypePluginManagerInterface'); - - $this->container->set('plugin.manager.field.field_type', $field_type_manager); - $this->container->set('entity.manager', $this->entityManager); - - $this->entityType->expects($this->any()) - ->method('getKey') - ->will($this->returnValueMap(array( - array('id', 'id'), - array('revision', 'revision'), - ))); - $this->entityType->expects($this->once()) - ->method('hasKey') - ->with('revision') - ->will($this->returnValue(TRUE)); - - $field_type_manager->expects($this->exactly(2)) - ->method('getDefaultSettings') - ->will($this->returnValue(array())); - $field_type_manager->expects($this->exactly(2)) - ->method('getDefaultInstanceSettings') - ->will($this->returnValue(array())); - - $this->fieldDefinitions['id'] = BaseFieldDefinition::create('string') - ->setName('id'); - $this->fieldDefinitions['revision'] = BaseFieldDefinition::create('string') - ->setName('revision'); - - $this->entityManager->expects($this->any()) - ->method('getDefinition') - ->with('test_entity') - ->will($this->returnValue($this->entityType)); - $this->entityManager->expects($this->any()) - ->method('getBaseFieldDefinitions') - ->will($this->returnValue($this->fieldDefinitions)); - - // Define a field definition for a test_field field. - $field_storage = $this->getMock('\Drupal\field\FieldStorageConfigInterface'); - $field_storage->deleted = FALSE; - - $field_storage->expects($this->any()) - ->method('getName') - ->will($this->returnValue('test_field')); - - $field_storage->expects($this->any()) - ->method('getTargetEntityTypeId') - ->will($this->returnValue('test_entity')); - - $field_schema = array( - 'columns' => array( - 'value' => array( - 'type' => 'varchar', - 'length' => 10, - 'not null' => FALSE, - ), - ), - 'unique keys' => array(), - 'indexes' => array(), - 'foreign keys' => array(), - ); - $field_storage->expects($this->any()) - ->method('getSchema') - ->will($this->returnValue($field_schema)); - - $schema = SqlContentEntityStorage::_fieldSqlSchema($field_storage); - - // Make sure that the entity_id schema field if of type varchar. - $this->assertEquals($schema['test_entity__test_field']['fields']['entity_id']['type'], 'varchar'); - $this->assertEquals($schema['test_entity__test_field']['fields']['revision_id']['type'], 'varchar'); - } - - /** * @covers ::create ->>>>>>> 8 */ public function testCreate() { $language_manager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface'); diff --git a/core/tests/Drupal/Tests/Core/UrlTest.php b/core/tests/Drupal/Tests/Core/UrlTest.php index bebc364..119eee6 100644 --- a/core/tests/Drupal/Tests/Core/UrlTest.php +++ b/core/tests/Drupal/Tests/Core/UrlTest.php @@ -73,9 +73,7 @@ protected function setUp() { } /** - * Tests the createFromPath method. - * - * @covers ::createFromPath + * Tests creating a Url from a request. */ public function testUrlFromRequest() { $this->router->expects($this->at(0)) @@ -137,22 +135,6 @@ public function testFromRouteFront() { } /** - * Tests that an invalid path will thrown an exception. - * - * @covers ::createFromPath - * - * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException - */ - public function testCreateFromPathInvalid() { - $this->router->expects($this->once()) - ->method('matchRequest') - ->with($this->getRequestConstraint('/non-existent')) - ->will($this->throwException(new ResourceNotFoundException())); - - $this->assertNull(Url::createFromPath('non-existent')); - } - - /** * Tests the createFromRequest method. * * @covers ::createFromRequest