Taddeus Kroes 13 rokov pred
rodič
commit
7967464ba5
2 zmenil súbory, kde vykonal 7 pridanie a 8 odobranie
  1. 7 2
      base.php
  2. 0 6
      tests/test_autoloader.php

+ 7 - 2
base.php

@@ -56,10 +56,15 @@ class FileNotFoundError extends \RuntimeException {
 }
 
 /**
- * Format a string of the form 'foo %(bar)' with given parameters like array('bar' => 'some value').
+ * Format a string using parameters in an associative array.
+ * 
+ * <code>
+ * echo asprintf('foo %(bar)', array('bar' => 'baz'));  // prints 'foo baz'
+ * </code>
  * 
  * @param string $format The string to format.
- * @param array $params An associative array with parameters that are used in the format.
+ * @param array $params An associative array with parameters that are used in $format.
+ * @package BasicWeb
  */
 function asprintf($format, array $params) {
 	return preg_replace_callback(

+ 0 - 6
tests/test_autoloader.php

@@ -6,16 +6,10 @@ use BasicWeb\Autoloader;
 define('PATH', 'tests/_files/');
 
 class AutoloaderTest extends PHPUnit_Framework_TestCase {
-	var $autoloader;
-	
 	function setUp() {
 		$this->autoloader = new Autoloader(PATH);
 	}
 	
-	function tearDown() {
-		unset($this->autoloader);
-	}
-	
 	function test_path_with_slash() {
 		$this->assertEquals(Autoloader::path_with_slash('dirname'), 'dirname/');
 		$this->assertEquals(Autoloader::path_with_slash('dirname/'), 'dirname/');