diff --git a/lib/classes/databox/Field/DCES/Contributor.php b/lib/classes/databox/Field/DCES/Contributor.php index f80e7d1ca6..19fa6c4cfb 100644 --- a/lib/classes/databox/Field/DCES/Contributor.php +++ b/lib/classes/databox/Field/DCES/Contributor.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Contributor extends databox_Field_DCESAbstract to the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Coverage.php b/lib/classes/databox/Field/DCES/Coverage.php index c0da316cb1..9136cca6f5 100644 --- a/lib/classes/databox/Field/DCES/Coverage.php +++ b/lib/classes/databox/Field/DCES/Coverage.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -33,6 +35,7 @@ class databox_Field_DCES_Coverage extends databox_Field_DCESAbstract is relevant.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Creator.php b/lib/classes/databox/Field/DCES/Creator.php index b66ea04793..db21d2de33 100644 --- a/lib/classes/databox/Field/DCES/Creator.php +++ b/lib/classes/databox/Field/DCES/Creator.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Creator extends databox_Field_DCESAbstract for making the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Date.php b/lib/classes/databox/Field/DCES/Date.php index eed7e956a0..5e4b881702 100644 --- a/lib/classes/databox/Field/DCES/Date.php +++ b/lib/classes/databox/Field/DCES/Date.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Date extends databox_Field_DCESAbstract in the lifecycle of the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Description.php b/lib/classes/databox/Field/DCES/Description.php index 6329447ae1..2f1431d71d 100644 --- a/lib/classes/databox/Field/DCES/Description.php +++ b/lib/classes/databox/Field/DCES/Description.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -30,6 +32,7 @@ class databox_Field_DCES_Description extends databox_Field_DCESAbstract protected $definition = 'An account of the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Format.php b/lib/classes/databox/Field/DCES/Format.php index 76024f1a19..b790ab5fa2 100644 --- a/lib/classes/databox/Field/DCES/Format.php +++ b/lib/classes/databox/Field/DCES/Format.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Format extends databox_Field_DCESAbstract or dimensions of the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Identifier.php b/lib/classes/databox/Field/DCES/Identifier.php index b7e6bcf5fa..ce5a27bc25 100644 --- a/lib/classes/databox/Field/DCES/Identifier.php +++ b/lib/classes/databox/Field/DCES/Identifier.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Identifier extends databox_Field_DCESAbstract within a given context.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Language.php b/lib/classes/databox/Field/DCES/Language.php index bd3b0af8ea..9cf9777c52 100644 --- a/lib/classes/databox/Field/DCES/Language.php +++ b/lib/classes/databox/Field/DCES/Language.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Language extends databox_Field_DCESAbstract (see [RFC4646] http://www.ietf.org/rfc/rfc4646.txt)'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Publisher.php b/lib/classes/databox/Field/DCES/Publisher.php index 9e8d5cd9b9..45936ab9c1 100644 --- a/lib/classes/databox/Field/DCES/Publisher.php +++ b/lib/classes/databox/Field/DCES/Publisher.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Publisher extends databox_Field_DCESAbstract available.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Relation.php b/lib/classes/databox/Field/DCES/Relation.php index 0c1bd6eacf..5e68648c98 100644 --- a/lib/classes/databox/Field/DCES/Relation.php +++ b/lib/classes/databox/Field/DCES/Relation.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -30,6 +32,7 @@ class databox_Field_DCES_Relation extends databox_Field_DCESAbstract protected $definition = 'A related resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Rights.php b/lib/classes/databox/Field/DCES/Rights.php index 30ae782c02..6cf98d4b69 100644 --- a/lib/classes/databox/Field/DCES/Rights.php +++ b/lib/classes/databox/Field/DCES/Rights.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Rights extends databox_Field_DCESAbstract in and over the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Source.php b/lib/classes/databox/Field/DCES/Source.php index 14a16eced0..b69b2cd952 100644 --- a/lib/classes/databox/Field/DCES/Source.php +++ b/lib/classes/databox/Field/DCES/Source.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -31,6 +33,7 @@ class databox_Field_DCES_Source extends databox_Field_DCESAbstract the described resource is derived.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Subject.php b/lib/classes/databox/Field/DCES/Subject.php index 9a10878061..81deeba70b 100644 --- a/lib/classes/databox/Field/DCES/Subject.php +++ b/lib/classes/databox/Field/DCES/Subject.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -30,6 +32,7 @@ class databox_Field_DCES_Subject extends databox_Field_DCESAbstract protected $definition = 'The topic of the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Title.php b/lib/classes/databox/Field/DCES/Title.php index a91dd6b2f1..0169124bfb 100644 --- a/lib/classes/databox/Field/DCES/Title.php +++ b/lib/classes/databox/Field/DCES/Title.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -30,6 +32,7 @@ class databox_Field_DCES_Title extends databox_Field_DCESAbstract protected $definition = 'A name given to the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/lib/classes/databox/Field/DCES/Type.php b/lib/classes/databox/Field/DCES/Type.php index a2189a706a..217880da3c 100644 --- a/lib/classes/databox/Field/DCES/Type.php +++ b/lib/classes/databox/Field/DCES/Type.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use JMS\Serializer\Annotation\SerializedName; + /** * * @package Databox DCES @@ -30,6 +32,7 @@ class databox_Field_DCES_Type extends databox_Field_DCESAbstract protected $definition = 'The nature or genre of the resource.'; /** + * @SerializedName("URI") * * @var string */ diff --git a/tests/classes/databox/Field/DCES/DCESTestCase.php b/tests/classes/databox/Field/DCES/DCESTestCase.php new file mode 100644 index 0000000000..d486ace610 --- /dev/null +++ b/tests/classes/databox/Field/DCES/DCESTestCase.php @@ -0,0 +1,40 @@ +assertEquals($name, $this->object->get_label()); + } + + public function testGet_definition() + { + $this->assertTrue(is_string($this->object->get_definition())); + $this->assertTrue(strlen($this->object->get_definition()) > 18); + } + + public function testGet_documentation_link() + { + $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); + } + + public function testSerialization() + { + $serializer = self::$DI['app']['serializer']; + + $data = json_decode($serializer->serialize($this->object, 'json'), true); + + $this->assertInternalType('array', $data); + $this->assertCount(3, $data); + + $this->assertArrayHasKey('label', $data); + $this->assertArrayHasKey('definition', $data); + $this->assertArrayHasKey('URI', $data); + + $this->assertInternalType('string', $data['label']); + $this->assertInternalType('string', $data['definition']); + $this->assertInternalType('string', $data['URI']); + } +} diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_ContributorTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_ContributorTest.php index a741d3146b..8fb2e3162c 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_ContributorTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_ContributorTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Contributor; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_CoverageTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_CoverageTest.php index bc926532d7..190e8f75fb 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_CoverageTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_CoverageTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Coverage; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_CreatorTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_CreatorTest.php index b24072a0fe..a41adb285c 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_CreatorTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_CreatorTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Creator; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_DateTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_DateTest.php index b0cab9b7e3..5a5253c7fc 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_DateTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_DateTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Date; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_DescriptionTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_DescriptionTest.php index 5a26e31230..fbdfa44771 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_DescriptionTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_DescriptionTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Description; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_FormatTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_FormatTest.php index 184d1d359b..1a74fcfc36 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_FormatTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_FormatTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Format; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_IdentifierTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_IdentifierTest.php index f502a675f8..4f88e59d8a 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_IdentifierTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_IdentifierTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Identifier; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_LanguageTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_LanguageTest.php index 1fffbaf9c5..b3c93e9a4e 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_LanguageTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_LanguageTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Language; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_PublisherTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_PublisherTest.php index ab23303c9f..4eebb1b784 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_PublisherTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_PublisherTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Publisher; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_RelationTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_RelationTest.php index b9da7d6d9b..b5616acd88 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_RelationTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_RelationTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Relation; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 18); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_RightsTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_RightsTest.php index 82b692ad1e..e3a7689679 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_RightsTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_RightsTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Rights; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_SourceTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_SourceTest.php index 94f86e224d..e7e349cd9f 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_SourceTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_SourceTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Source; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_SubjectTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_SubjectTest.php index 237bc1eb79..1a3624c087 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_SubjectTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_SubjectTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Subject; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_TitleTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_TitleTest.php index 183b7adb92..ea82239c0b 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_TitleTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_TitleTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Title; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } } diff --git a/tests/classes/databox/Field/DCES/databox_Field_DCES_TypeTest.php b/tests/classes/databox/Field/DCES/databox_Field_DCES_TypeTest.php index 08203b6a37..487229ad67 100644 --- a/tests/classes/databox/Field/DCES/databox_Field_DCES_TypeTest.php +++ b/tests/classes/databox/Field/DCES/databox_Field_DCES_TypeTest.php @@ -1,33 +1,10 @@ object = new databox_Field_DCES_Type; } - - public function testGet_label() - { - $data = explode('_', __CLASS__); - $name = str_replace('Test', '', array_pop($data)); - $this->assertEquals($name, $this->object->get_label()); - } - - public function testGet_definition() - { - $this->assertTrue(is_string($this->object->get_definition())); - $this->assertTrue(strlen($this->object->get_definition()) > 20); - } - - public function testGet_documentation_link() - { - $this->assertRegExp('/^http:\/\/dublincore\.org\/documents\/dces\/#[a-z]+$/', $this->object->get_documentation_link()); - } }