/** * Should test getting unique value for theme * * @return void */ public function testGetThemeUniqueValue() { $partial_sum = ( PHPUnit_Framework_Assert::readAttribute($this->object, 'source_mtime') + PHPUnit_Framework_Assert::readAttribute( $this->object, 'default_source_mtime' ) + $this->object->get('user_preferences_mtime') + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info ); $this->object->set('fontsize', 10); $this->assertEquals(10 + $partial_sum, $this->object->getThemeUniqueValue()); $this->object->set('fontsize', null); $_COOKIE['pma_fontsize'] = 20; $this->assertEquals(20 + $partial_sum, $this->object->getThemeUniqueValue()); unset($_COOKIE['pma_fontsize']); $this->assertEquals($partial_sum, $this->object->getThemeUniqueValue()); }
/** * Tests for rewriting URL to SSL variant * * @param string $original Original URL * @param string $expected Expected URL rewritten to SSL * * @return void * * @dataProvider sslUris */ public function testSSLUri($original, $expected) { $this->object->set('PmaAbsoluteUri', $original); $this->assertEquals($expected, $this->object->getSSLUri()); }