]> BookStack Code Mirror - bookstack/commitdiff
Updated travis testing to work with new helper configuration (#175)
authorDan Brown <redacted>
Sat, 27 Aug 2016 10:27:23 +0000 (11:27 +0100)
committerGitHub <redacted>
Sat, 27 Aug 2016 10:27:23 +0000 (11:27 +0100)
* Updated travis to call phpunit globally rather then booting application first

.travis.yml
app/helpers.php

index bea8d179597f920b1fa59ebf9249d5faf1e15305..c4d289a53bdfc09c2e6b1d7d2afdea3c754b9b96 100644 (file)
@@ -6,7 +6,6 @@ php:
 
 cache:
   directories:
-    - vendor
     - node_modules
     - $HOME/.composer/cache
 
@@ -29,8 +28,10 @@ before_script:
   - composer install --prefer-dist --no-interaction
   - npm install
   - ./node_modules/.bin/gulp
+  - php artisan clear-compiled -n
+  - php artisan optimize -n
   - php artisan migrate --force -n --database=mysql_testing
   - php artisan db:seed --force -n --class=DummyContentSeeder --database=mysql_testing
 
 script:
-  - vendor/bin/phpunit
\ No newline at end of file
+  - phpunit
\ No newline at end of file
index e4f9b1b107c94cf1a9f47383b6f2634861eddb78..d28b1956f813e678cd2da116bccc727cea5eacfa 100644 (file)
@@ -2,33 +2,31 @@
 
 use BookStack\Ownable;
 
-if (!function_exists('versioned_asset')) {
-    /**
-     * Get the path to a versioned file.
-     *
-     * @param  string $file
-     * @return string
-     *
-     * @throws \InvalidArgumentException
-     */
-    function versioned_asset($file)
-    {
-        static $manifest = null;
-
-        if (is_null($manifest)) {
-            $manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true);
-        }
-
-        if (isset($manifest[$file])) {
-            return baseUrl($manifest[$file]);
-        }
-
-        if (file_exists(public_path($file))) {
-            return baseUrl($file);
-        }
-
-        throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
+/**
+ * Get the path to a versioned file.
+ *
+ * @param  string $file
+ * @return string
+ *
+ * @throws \InvalidArgumentException
+ */
+function versioned_asset($file)
+{
+    static $manifest = null;
+
+    if (is_null($manifest)) {
+        $manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true);
+    }
+
+    if (isset($manifest[$file])) {
+        return baseUrl($manifest[$file]);
     }
+
+    if (file_exists(public_path($file))) {
+        return baseUrl($file);
+    }
+
+    throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
 }
 
 /**
Morty Proxy This is a proxified and sanitized view of the page, visit original site.