| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455 |
- <?php
- namespace Opentalent\OtWidgets\Tests\Unit\Domain\Model;
- /**
- * Test case.
- *
- * @author Olivier Massot <olivier.massot@2iopenservice.fr>
- */
- class OrganizationTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
- {
- /**
- * @var \Opentalent\OtWidgets\Domain\Model\Organization
- */
- protected $subject = null;
- protected function setUp()
- {
- parent::setUp();
- $this->subject = new \Opentalent\OtWidgets\Domain\Model\Organization();
- }
- protected function tearDown()
- {
- parent::tearDown();
- }
- /**
- * @test
- */
- public function getIdReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getId()
- );
- }
- /**
- * @test
- */
- public function setIdForStringSetsId()
- {
- $this->subject->setId('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'id',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getTypeReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getType()
- );
- }
- /**
- * @test
- */
- public function setTypeForStringSetsType()
- {
- $this->subject->setType('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'type',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getSubDomainReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getSubDomain()
- );
- }
- /**
- * @test
- */
- public function setSubDomainForStringSetsSubDomain()
- {
- $this->subject->setSubDomain('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'subDomain',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getNameReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getName()
- );
- }
- /**
- * @test
- */
- public function setNameForStringSetsName()
- {
- $this->subject->setName('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'name',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getSlugReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getSlug()
- );
- }
- /**
- * @test
- */
- public function setSlugForStringSetsSlug()
- {
- $this->subject->setSlug('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'slug',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getPrincipalTypeReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getPrincipalType()
- );
- }
- /**
- * @test
- */
- public function setPrincipalTypeForStringSetsPrincipalType()
- {
- $this->subject->setPrincipalType('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'principalType',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getDescriptionReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getDescription()
- );
- }
- /**
- * @test
- */
- public function setDescriptionForStringSetsDescription()
- {
- $this->subject->setDescription('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'description',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getCategoriesReturnsInitialValueForInt()
- {
- self::assertSame(
- 0,
- $this->subject->getCategories()
- );
- }
- /**
- * @test
- */
- public function setCategoriesForIntSetsCategories()
- {
- $this->subject->setCategories(12);
- self::assertAttributeEquals(
- 12,
- 'categories',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getAddressCityReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getAddressCity()
- );
- }
- /**
- * @test
- */
- public function setAddressCityForStringSetsAddressCity()
- {
- $this->subject->setAddressCity('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'addressCity',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getPostalCodeReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getPostalCode()
- );
- }
- /**
- * @test
- */
- public function setPostalCodeForStringSetsPostalCode()
- {
- $this->subject->setPostalCode('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'postalCode',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getStreetAdressReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getStreetAdress()
- );
- }
- /**
- * @test
- */
- public function setStreetAdressForStringSetsStreetAdress()
- {
- $this->subject->setStreetAdress('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'streetAdress',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getLatitudeReturnsInitialValueForFloat()
- {
- self::assertSame(
- 0.0,
- $this->subject->getLatitude()
- );
- }
- /**
- * @test
- */
- public function setLatitudeForFloatSetsLatitude()
- {
- $this->subject->setLatitude(3.14159265);
- self::assertAttributeEquals(
- 3.14159265,
- 'latitude',
- $this->subject,
- '',
- 0.000000001
- );
- }
- /**
- * @test
- */
- public function getLongitudeReturnsInitialValueForFloat()
- {
- self::assertSame(
- 0.0,
- $this->subject->getLongitude()
- );
- }
- /**
- * @test
- */
- public function setLongitudeForFloatSetsLongitude()
- {
- $this->subject->setLongitude(3.14159265);
- self::assertAttributeEquals(
- 3.14159265,
- 'longitude',
- $this->subject,
- '',
- 0.000000001
- );
- }
- /**
- * @test
- */
- public function getCountryReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getCountry()
- );
- }
- /**
- * @test
- */
- public function setCountryForStringSetsCountry()
- {
- $this->subject->setCountry('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'country',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getLogoReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getLogo()
- );
- }
- /**
- * @test
- */
- public function setLogoForStringSetsLogo()
- {
- $this->subject->setLogo('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'logo',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getParentNameReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getParentName()
- );
- }
- /**
- * @test
- */
- public function setParentNameForStringSetsParentName()
- {
- $this->subject->setParentName('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'parentName',
- $this->subject
- );
- }
- /**
- * @test
- */
- public function getParentSubdomainReturnsInitialValueForString()
- {
- self::assertSame(
- '',
- $this->subject->getParentSubdomain()
- );
- }
- /**
- * @test
- */
- public function setParentSubdomainForStringSetsParentSubdomain()
- {
- $this->subject->setParentSubdomain('Conceived at T3CON10');
- self::assertAttributeEquals(
- 'Conceived at T3CON10',
- 'parentSubdomain',
- $this->subject
- );
- }
- }
|