Commit 332c0636 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] Changes Tests to PSR-2

parent 393bca0a
...@@ -14,27 +14,32 @@ ...@@ -14,27 +14,32 @@
/** /**
* Testcase. * Testcase.
*
* @author Thomas Löffler <thomas.loeffler@typo3.org> * @author Thomas Löffler <thomas.loeffler@typo3.org>
*/ */
class Tx_T3o_membership_Controller_MemberControllerTest extends Tx_Extbase_Tests_Unit_BaseTestCase { class Tx_T3o_membership_Controller_MemberControllerTest extends Tx_Extbase_Tests_Unit_BaseTestCase
/** {
* @var Tx_T3oMembership_Domain_Model_Member /**
*/ * @var Tx_T3oMembership_Domain_Model_Member
protected $fixture; */
protected $fixture;
public function setUp() { public function setUp()
$this->fixture = new Tx_T3oMembership_Domain_Model_Member(); {
} $this->fixture = new Tx_T3oMembership_Domain_Model_Member();
}
public function tearDown() { public function tearDown()
unset($this->fixture); {
} unset($this->fixture);
}
/** /**
* @test * @test
*/ */
public function dummyMethod() { public function dummyMethod()
$this->markTestIncomplete(); {
} $this->markTestIncomplete();
}
} }
\ No newline at end of file
...@@ -14,181 +14,216 @@ ...@@ -14,181 +14,216 @@
/** /**
* Testcase. * Testcase.
*
* @author Thomas Löffler <thomas.loeffler@typo3.org> * @author Thomas Löffler <thomas.loeffler@typo3.org>
*/ */
class Tx_T3oMembership_Domain_Model_MemberTest extends Tx_Extbase_Tests_Unit_BaseTestCase { class Tx_T3oMembership_Domain_Model_MemberTest extends Tx_Extbase_Tests_Unit_BaseTestCase
/** {
* @var Tx_T3oMembership_Domain_Model_Member /**
*/ * @var Tx_T3oMembership_Domain_Model_Member
protected $fixture; */
protected $fixture;
public function setUp() {
$this->fixture = new Tx_T3oMembership_Domain_Model_Member(); public function setUp()
} {
$this->fixture = new Tx_T3oMembership_Domain_Model_Member();
public function tearDown() { }
unset($this->fixture);
} public function tearDown()
{
/** unset($this->fixture);
* @test }
*/
public function getNameReturnsInitialValueForString() { } /**
* @test
/** */
* @test public function getNameReturnsInitialValueForString()
*/ {
public function setNameForStringSetsName() { }
$this->fixture->setName('Conceived at T3CON10');
/**
$this->assertSame( * @test
'Conceived at T3CON10', */
$this->fixture->getName() public function setNameForStringSetsName()
); {
} $this->fixture->setName('Conceived at T3CON10');
/** $this->assertSame(
* @test 'Conceived at T3CON10',
*/ $this->fixture->getName()
public function getExternalIdReturnsInitialValueForInteger() { );
$this->assertSame( }
0,
$this->fixture->getExternalId() /**
); * @test
} */
public function getExternalIdReturnsInitialValueForInteger()
/** {
* @test $this->assertSame(
*/ 0,
public function setExternalIdForIntegerSetsExternalId() { $this->fixture->getExternalId()
$this->fixture->setExternalId(12); );
}
$this->assertSame(
12, /**
$this->fixture->getExternalId() * @test
); */
} public function setExternalIdForIntegerSetsExternalId()
{
/** $this->fixture->setExternalId(12);
* @test
*/ $this->assertSame(
public function getEndDateReturnsInitialValueForDateTime() { } 12,
$this->fixture->getExternalId()
/** );
* @test }
*/
public function setEndDateForDateTimeSetsEndDate() { } /**
* @test
/** */
* @test public function getEndDateReturnsInitialValueForDateTime()
*/ {
public function getAddressReturnsInitialValueForString() { } }
/** /**
* @test * @test
*/ */
public function setAddressForStringSetsAddress() { public function setEndDateForDateTimeSetsEndDate()
$this->fixture->setAddress('Conceived at T3CON10'); {
}
$this->assertSame(
'Conceived at T3CON10', /**
$this->fixture->getAddress() * @test
); */
} public function getAddressReturnsInitialValueForString()
{
/** }
* @test
*/ /**
public function getZipReturnsInitialValueForString() { } * @test
*/
/** public function setAddressForStringSetsAddress()
* @test {
*/ $this->fixture->setAddress('Conceived at T3CON10');
public function setZipForStringSetsZip() {
$this->fixture->setZip('Conceived at T3CON10'); $this->assertSame(
'Conceived at T3CON10',
$this->assertSame( $this->fixture->getAddress()
'Conceived at T3CON10', );
$this->fixture->getZip() }
);
} /**
* @test
/** */
* @test public function getZipReturnsInitialValueForString()
*/ {
public function getCityReturnsInitialValueForString() { } }
/** /**
* @test * @test
*/ */
public function setCityForStringSetsCity() { public function setZipForStringSetsZip()
$this->fixture->setCity('Conceived at T3CON10'); {
$this->fixture->setZip('Conceived at T3CON10');
$this->assertSame(
'Conceived at T3CON10', $this->assertSame(
$this->fixture->getCity() 'Conceived at T3CON10',
); $this->fixture->getZip()
} );
}
/**
* @test /**
*/ * @test
public function getCountryReturnsInitialValueForString() { } */
public function getCityReturnsInitialValueForString()
/** {
* @test }
*/
public function setCountryForStringSetsCountry() { /**
$this->fixture->setCountry('Conceived at T3CON10'); * @test
*/
$this->assertSame( public function setCityForStringSetsCity()
'Conceived at T3CON10', {
$this->fixture->getCountry() $this->fixture->setCity('Conceived at T3CON10');
);
} $this->assertSame(
'Conceived at T3CON10',
/** $this->fixture->getCity()
* @test );
*/ }
public function getEmailReturnsInitialValueForString() { }
/**
/** * @test
* @test */
*/ public function getCountryReturnsInitialValueForString()
public function setEmailForStringSetsEmail() { {
$this->fixture->setEmail('Conceived at T3CON10'); }
$this->assertSame( /**
'Conceived at T3CON10', * @test
$this->fixture->getEmail() */
); public function setCountryForStringSetsCountry()
} {
$this->fixture->setCountry('Conceived at T3CON10');
/**
* @test $this->assertSame(
*/ 'Conceived at T3CON10',
public function getUrlReturnsInitialValueForString() { } $this->fixture->getCountry()
);
/** }
* @test
*/ /**
public function setUrlForStringSetsUrl() { * @test
$this->fixture->setUrl('Conceived at T3CON10'); */
public function getEmailReturnsInitialValueForString()
$this->assertSame( {
'Conceived at T3CON10', }
$this->fixture->getUrl()
); /**
} * @test
*/
/** public function setEmailForStringSetsEmail()
* @test {
*/ $this->fixture->setEmail('Conceived at T3CON10');
public function getMembershipReturnsInitialValueForTx_T3oMembership_Domain_Model_Membership() { }
$this->assertSame(
/** 'Conceived at T3CON10',
* @test $this->fixture->getEmail()
*/ );
public function setMembershipForTx_T3oMembership_Domain_Model_MembershipSetsMembership() { } }
/**
* @test
*/
public function getUrlReturnsInitialValueForString()
{
}
/**
* @test
*/
public function setUrlForStringSetsUrl()
{
$this->fixture->setUrl('Conceived at T3CON10');
$this->assertSame(
'Conceived at T3CON10',
$this->fixture->getUrl()
);
}
/**
* @test
*/
public function getMembershipReturnsInitialValueForTx_T3oMembership_Domain_Model_Membership()
{
}
/**
* @test
*/
public function setMembershipForTx_T3oMembership_Domain_Model_MembershipSetsMembership()
{
}
} }
\ No newline at end of file
...@@ -14,54 +14,64 @@ ...@@ -14,54 +14,64 @@
/** /**
* Testcase. * Testcase.
*
* @author Thomas Löffler <thomas.loeffler@typo3.org> * @author Thomas Löffler <thomas.loeffler@typo3.org>
*/ */
class Tx_T3oMembership_Domain_Model_MembershipTest extends Tx_Extbase_Tests_Unit_BaseTestCase { class Tx_T3oMembership_Domain_Model_MembershipTest extends Tx_Extbase_Tests_Unit_BaseTestCase
/** {
* @var Tx_T3oMembership_Domain_Model_Membership /**
*/ * @var Tx_T3oMembership_Domain_Model_Membership
protected $fixture; */
protected $fixture;
public function setUp() { public function setUp()
$this->fixture = new Tx_T3oMembership_Domain_Model_Membership(); {
} $this->fixture = new Tx_T3oMembership_Domain_Model_Membership();
}
public function tearDown() { public function tearDown()
unset($this->fixture); {
} unset($this->fixture);
}
/** /**
* @test * @test
*/ */
public function getNameReturnsInitialValueForString() { } public function getNameReturnsInitialValueForString()
{
}
/** /**
* @test * @test
*/ */
public function setNameForStringSetsName() { public function setNameForStringSetsName()
$this->fixture->setName('Conceived at T3CON10'); {
$this->fixture->setName('Conceived at T3CON10');
$this->assertSame( $this->assertSame(
'Conceived at T3CON10', 'Conceived at T3CON10',
$this->fixture->getName() $this->fixture->getName()
); );
} }
/** /**
* @test * @test
*/ */
public function getLogoReturnsInitialValueForString() { } public function getLogoReturnsInitialValueForString()
{
}
/** /**
* @test * @test
*/ */
public function setLogoForStringSetsLogo() { public function setLogoForStringSetsLogo()
$this->fixture->setLogo('Conceived at T3CON10'); {
$this->fixture->setLogo('Conceived at T3CON10');
$this->assertSame( $this->assertSame(
'Conceived at T3CON10', 'Conceived at T3CON10',
$this->fixture->getLogo() $this->fixture->getLogo()
); );
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment