aboutsummaryrefslogtreecommitdiff
path: root/test/segments/symfony_version.spec
diff options
context:
space:
mode:
Diffstat (limited to 'test/segments/symfony_version.spec')
-rwxr-xr-xtest/segments/symfony_version.spec17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/segments/symfony_version.spec b/test/segments/symfony_version.spec
index 65d193b0..99dea476 100755
--- a/test/segments/symfony_version.spec
+++ b/test/segments/symfony_version.spec
@@ -7,8 +7,6 @@ SHUNIT_PARENT=$0
function setUp() {
export TERM="xterm-256color"
- # Load Powerlevel9k
- source powerlevel9k.zsh-theme
P9K_HOME=$(pwd)
### Test specific
@@ -33,6 +31,9 @@ function testSymfonyVersionSegmentPrintsNothingIfPhpIsNotAvailable() {
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
alias php="nophp"
+ # Load Powerlevel9k
+ source ${P9K_HOME}/powerlevel9k.zsh-theme
+
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
unalias php
@@ -46,6 +47,9 @@ function testSymfonyVersionSegmentPrintsNothingIfSymfonyIsNotAvailable() {
# navigate into a folder that does not contain symfony.
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
+ # Load Powerlevel9k
+ source ${P9K_HOME}/powerlevel9k.zsh-theme
+
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
}
@@ -61,6 +65,9 @@ function testSymfonyVersionPrintsNothingIfPhpThrowsAnError() {
Parse error: parse error, expecting `;´ or `{´ in /Users/dr/Privat/vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php on line 97"
}
+ # Load Powerlevel9k
+ source ${P9K_HOME}/powerlevel9k.zsh-theme
+
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
unfunction php
@@ -77,6 +84,9 @@ function testSymfonyVersionSegmentWorks() {
echo "Symfony version 3.1.4 - app/dev/debug"
}
+ # Load Powerlevel9k
+ source ${P9K_HOME}/powerlevel9k.zsh-theme
+
assertEquals "%K{240} %F{black%}SF %f%F{black}3.1.4 %k%F{240}%f " "$(build_left_prompt)"
unfunction php
@@ -96,6 +106,9 @@ function testSymfonyVersionSegmentWorksInNestedFolder() {
mkdir -p src/P9K/AppBundle
cd src/P9K/AppBundle
+ # Load Powerlevel9k
+ source ${P9K_HOME}/powerlevel9k.zsh-theme
+
assertEquals "%K{240} %F{black%}SF %f%F{black}3.1.4 %k%F{240}%f " "$(build_left_prompt)"
unfunction php