public function testSetAndGetParam() { $content = new Image(); $defaultParams = $content->getDefaultParams(); foreach ($defaultParams as $param) { $this->assertTrue(array_key_exists('value', $param)); } foreach ($content->getAllParams() as $param) { $this->assertTrue(array_key_exists('value', $param)); } $this->assertSame($defaultParams, $content->getAllParams()); $this->assertNull($content->getParam('foobar')); $this->assertEquals($defaultParams['width'], $content->getParam('width')); $this->assertSame(50, $content->getParamValue('width')); $content->setParam('width', '1234'); $this->assertNotSame(1234, $content->getParamValue('width')); $this->assertSame('1234', $content->getParamValue('width')); $this->assertNotEquals($defaultParams, $content->getAllParams()); }