/** * testRemoveParamRemovesExistingParam * * @test * @depends testRemoveParamOnNotExististingReturnsFalse */ public function testRemoveParamRemovesExistingParam() { $this->params->setParam('test', 123); $this->assertTrue($this->params->hasParam('test')); $this->assertEquals(123, $this->params->getParam('test')); $this->assertTrue($this->params->removeParam('test')); $this->assertFalse($this->params->hasParam('test')); $this->assertNull($this->params->getParam('test')); }
/** * testGetParamReturnsDefaultValueForNoExistingParam * * @test */ public function testGetParamReturnsDefaultValueForNoExistingParam() { $this->assertEquals(false, $this->params->getParam('not-existing1', false)); $this->assertEquals(123, $this->params->getParam('not-existing2', 123)); $this->assertEquals('test', $this->params->getParam('not-existing3', 'test')); }