Skip to content
Browse files

QA: Misc fixes

  • Loading branch information...
1 parent ddf13ab commit 243c77c5bc8506ebfece1fb97c5f55929140fcba @daschl daschl committed Mar 16, 2012
View
10 console/command/Library.php
@@ -224,15 +224,15 @@ public function extract($name = 'new', $result = null) {
return false;
}
}
-
+
if (file_exists($from)) {
try {
$archive = new Phar($from);
} catch (Exception $e) {
$this->error($e->getMessage());
return false;
}
-
+
if ($archive->extractTo($to)) {
$this->out(basename($to) . " created in " . dirname($to) . " from {$from}");
@@ -323,7 +323,7 @@ protected function _replaceAfterExtract($extracted, $options = array()) {
if ($pathinfo['dirname'] != '.') {
$this->lithiumLibraryPath = "'" . $this->lithiumLibraryPath . "'";
}
-
+
$search = 'define(\'LITHIUM_LIBRARY_PATH\', ';
$search .= 'dirname(LITHIUM_APP_PATH) . \'/libraries\');';
$replace = 'define(\'LITHIUM_LIBRARY_PATH\', ';
@@ -334,7 +334,7 @@ protected function _replaceAfterExtract($extracted, $options = array()) {
}
$replacements['config/bootstrap/libraries.php'][$search] = $replace;
}
-
+
foreach ($replacements as $filename => $definitions) {
foreach ($definitions as $search => $replace) {
unset($definitions[$search]);
@@ -712,7 +712,7 @@ protected function _toPath($name = null) {
if ($name && $pathinfo['dirname'] != '.') {
return $name;
}
-
+
$library = Libraries::get($name);
if (!empty($library['path'])) {
View
4 core/Libraries.php
@@ -157,7 +157,7 @@ class Libraries {
protected static $_cachedPaths = array();
/**
- * Holds associations between fully-namespaced class names and file's paths mapped
+ * Holds associations between fully-namespaced class names and file's paths mapped
* with `lithium\core\Libraries::map()`.
*
* @var array
@@ -1055,4 +1055,4 @@ protected static function _params($type, $name = "*") {
}
}
-?>
+?>
View
2 g11n/Locale.php
@@ -301,4 +301,4 @@ protected static function _preferredConsole($request) {
}
}
-?>
+?>
View
2 tests/cases/console/command/LibraryTest.php
@@ -319,7 +319,7 @@ public function testNoFormulate() {
public function testFormulateNoPath() {
$isWin = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
$this->skipIf($isWin, 'Permissions cannot be modified on Windows.');
-
+
$path = $this->_testPath . '/library_test_no_plugin';
umask(0);
mkdir($path, 655);
View
2 tests/cases/console/command/TestTest.php
@@ -40,7 +40,7 @@ public function tearDown() {
$_SERVER = $this->_backup['_SERVER'];
chdir($this->_backup['cwd']);
}
-
+
public function skip() {
$isWin = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
$this->skipIf($isWin, 'The test command needs to be refactored to work on windows.');
View
12 tests/cases/core/LibrariesTest.php
@@ -33,12 +33,12 @@ public function tearDown() {
public function testNamespaceToFileTranslation() {
$DS = DIRECTORY_SEPARATOR;
$invalidDS = $DS == '/' ? '\\' : '/';
-
+
$result = Libraries::path('\lithium\core\Libraries');
$this->assertTrue(strpos($result, "${DS}lithium${DS}core${DS}Libraries.php"));
$this->assertTrue(file_exists($result));
$this->assertFalse(strpos($result, $invalidDS));
-
+
$result = Libraries::path('lithium\core\Libraries');
$this->assertTrue(strpos($result, "${DS}lithium${DS}core${DS}Libraries.php"));
$this->assertTrue(file_exists($result));
@@ -654,7 +654,7 @@ class LibTest{ public function testMe() {
return 'patched class';
}}"
);
-
+
$expected = $result = Libraries::realPath($testApp . '/lib/LibTest.php');
$result = Libraries::path('test_app\\lib\\LibTest');
@@ -687,12 +687,12 @@ class LibTest{ public function testMe() {
));
$object = new \test_app\lib\LibTest();
-
+
$result = $object->testMe();
- $this->assertEqual('patched class', $result);
+ $this->assertEqual('patched class', $result);
$this->_cleanUp();
}
}
-?>
+?>
View
2 tests/cases/g11n/LocaleTest.php
@@ -378,4 +378,4 @@ public function testPreferredAvailableNegotiation() {
}
}
-?>
+?>

0 comments on commit 243c77c

Please sign in to comment.
Something went wrong with that request. Please try again.