示例#1
0
 /**
  * Creates the CSS style attribute content for an icon for the extension
  * $extensionKey.
  *
  * @param string $extensionKey
  *        the key of a loaded extension, may also be "typo3"
  *
  * @return string the content for the "style" attribute, will not be empty
  *
  * @throws Tx_Phpunit_Exception_NoTestsDirectory
  *         if there is not extension with tests with the given key
  */
 protected function createIconStyle($extensionKey)
 {
     if ($extensionKey === '') {
         throw new Tx_Phpunit_Exception_NoTestsDirectory('$extensionKey must not be empty.', 1303503647);
     }
     if (!$this->testFinder->existsTestableForKey($extensionKey)) {
         throw new Tx_Phpunit_Exception_NoTestsDirectory('The extension ' . $extensionKey . ' is not loaded.', 1303503664);
     }
     $testable = $this->testFinder->getTestableForKey($extensionKey);
     return 'background: url(' . $testable->getIconPath() . ') 3px 50% white no-repeat; padding: 1px 1px 1px 24px;';
 }
 /**
  * Creates the CSS style attribute content for an icon for the testable with the key $testableKey.
  *
  * @param string $testableKey
  *        the key of a Tx_Phpunit_Testable object, may also be "typo3", must not be empty
  *
  * @return string the content for the "style" attribute, will not be empty
  *
  * @throws InvalidArgumentException
  *         if there is no extension with tests for the given key
  */
 protected function createIconStyle($testableKey)
 {
     $testable = $this->testFinder->getTestableForKey($testableKey);
     return 'background: url(' . $testable->getIconPath() . ') 3px 50% white no-repeat; padding: 1px 1px 1px 24px;';
 }