Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/third-party-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
- 'php_parser'
- 'symfony'
- 'laravel'
- 'yii'
- 'mezzio'
- 'spiral'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add silverstripe framework
They have some "weird" code in some areas

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would definitely accept a PR for it, see #184


steps:
- name: checkout
Expand Down
18 changes: 3 additions & 15 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ dump file:
test filter='':
cargo test --all {{filter}} -- --skip third_party

# run integration tests for `azjezz/psl` library.
test-psl:
cargo test php_standard_library -- --nocapture

# run integration tests for `nikic/php-parser` library.
test-php-parser:
cargo test nikic_php_parser -- --nocapture

# run integration tests for `symfony/symfony` framework.
test-symfony:
cargo test symfony_framework -- --nocapture

# run integration tests for `laravel/framework` framework.
test-laravel:
cargo test laravel_framework -- --nocapture
# run integration tests for third party libraries.
test-third-party:
cargo test third_party -- --nocapture
51 changes: 37 additions & 14 deletions tests/third_party_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,6 @@ fn third_party_3_symfony_framework() {
"src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/Fixtures/proxy-implem.php",
// file contains syntax error used for testing.
"src/Symfony/Component/Config/Tests/Fixtures/ParseError.php",
// FIXME: Remove this one once I've found the energy to sort out heredocs / nowdocs.
"src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php",
"src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php",
"src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php",
"src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php",
"src/Symfony/Component/VarExporter/ProxyHelper.php",
"src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php",
// FIXME: Remove these once we can support arbitrary opening and closing tags.
"src/Symfony/Component/ErrorHandler/Resources/views/exception.html.php",
"src/Symfony/Component/ErrorHandler/Resources/views/exception_full.html.php",
"src/Symfony/Component/ErrorHandler/Resources/views/logs.html.php",
"src/Symfony/Component/ErrorHandler/Resources/views/trace.html.php",
"src/Symfony/Component/ErrorHandler/Resources/views/traces.html.php",
"src/Symfony/Component/ErrorHandler/Resources/views/traces_text.html.php",
],
);
}
Expand All @@ -74,6 +60,43 @@ fn third_party_4_nikic_php_parser() {
);
}

#[test]
fn third_party_5_yii_framework() {
test_repository(
"yii-framework",
"https://github.com/yiisoft/yii2",
"master",
&["framework", "tests"],
&[],
);
}

#[test]
fn third_party_6_spiral_framework() {
test_repository(
"spiral-framework",
"https://github.com/spiral/framework",
"master",
&["src", "tests"],
&[
// file contains syntax error used for testing.
"/src/Core/tests/Fixtures/CorruptedClass.php",
"/src/Tokenizer/tests/Classes/BrokenClass.php",
],
);
}

#[test]
fn third_party_7_mezzio_framework() {
test_repository(
"mezzio-framework",
"https://github.com/mezzio/mezzio",
"3.15.x",
&["src", "test"],
&[],
);
}

fn test_repository(
name: &str,
repository: &str,
Expand Down