Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(test): begin rewrite tests from scratch using pest (#86)
* dev(lint): compat php 7.3+ * build: add uggo script to download latest illuminate/foundation * chore(vendor): update Foundation to 8.26.1 * build(test): begin rewrite tests from scratch using pest * fix(test-helpers): avoid arrow function for php 7.3 compat
- Loading branch information
Showing
71 changed files
with
425 additions
and
1,754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# pro tip: maybe don't run this script. i mostly just hacked my way through this. this should definitely not be automated in any way. | ||
|
||
# thx u https://explainshell.com/ | ||
|
||
# YOINK! https://stackoverflow.com/a/4774063 | ||
SCRIPTS_DIR="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" | ||
|
||
TEMP_DIR="${SCRIPTS_DIR}/.temp" | ||
|
||
LARAVEL_VERSION=$(curl --silent "https://api.github.com/repos/laravel/framework/tags" | jq -r '.[].name' | sort | tail -1) | ||
|
||
ARCHIVE_FILE="${LARAVEL_VERSION}.tar.gz" | ||
|
||
rm -rf "${TEMP_DIR}" | ||
mkdir -p "${TEMP_DIR}" | ||
|
||
wget -q "https://github.com/laravel/framework/archive/${ARCHIVE_FILE}" -O "${TEMP_DIR}/${ARCHIVE_FILE}" | ||
|
||
ROOT_FOLDER=$(tar ztf "${TEMP_DIR}/${ARCHIVE_FILE}" | sort | head -1) | ||
|
||
pushd "${TEMP_DIR}" | ||
|
||
# only extracts the Foundation folder | ||
tar xzf "${TEMP_DIR}/${ARCHIVE_FILE}" "${ROOT_FOLDER}src/Illuminate/Foundation" --strip-components=4 --one-top-level=Foundation | ||
|
||
popd | ||
|
||
# only syncs files that already exist in the destination | ||
rsync -a --existing "${TEMP_DIR}/Foundation/" "${SCRIPTS_DIR}/../src/Illuminate/Foundation/" | ||
|
||
rm -rf "${TEMP_DIR}" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
use Roots\Acorn\AliasLoader; | ||
|
||
it('should load global function aliases', function () { | ||
$loader = AliasLoader::getInstance([]); | ||
|
||
expect(function_exists('app'))->toBeFalse(); | ||
expect(function_exists('asset'))->toBeFalse(); | ||
expect(function_exists('config'))->toBeFalse(); | ||
expect(function_exists('view'))->toBeFalse(); | ||
|
||
$loader->register(); | ||
|
||
expect(function_exists('app'))->toBeTrue(); | ||
expect(function_exists('asset'))->toBeTrue(); | ||
expect(function_exists('config'))->toBeTrue(); | ||
expect(function_exists('view'))->toBeTrue(); | ||
}); |
Oops, something went wrong.