for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Provides test methods to ensure constants are available and as expected for all houses.
*/
class HousesTest extends PHPUnit_Framework_TestCase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Test that the Royal edge-case house is correctly defined.
public function testRoyalHouseDefined()
$this->assertEquals(0, HOUSE_TYPE_ROYAL);
}
* Test that the House of Commons is correctly defined.
public function testCommonsHouseDefined()
$this->assertEquals(1, HOUSE_TYPE_COMMONS);
* Test that the House of Lords is correctly defined.
public function testLordsHouseDefined()
$this->assertEquals(2, HOUSE_TYPE_LORDS);
* Test that the Northern Ireland Assembly is correctly defined.
public function testNIHouseDefined()
$this->assertEquals(3, HOUSE_TYPE_NI);
* Test that the Scottish Parliament is correctly defined.
public function testScotlandHouseDefined()
$this->assertEquals(4, HOUSE_TYPE_SCOTLAND);
* Test that the Assembly for Wales is correctly defined.
public function testWalesHouseDefined()
$this->assertEquals(5, HOUSE_TYPE_WALES);
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.