Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 7998913

Browse files
committed
support and require fbexpect 2.6.1+
1 parent d3add4d commit 7998913

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"hhvm/hhast": "^4.6",
1616
"hhvm/hhvm-autoload": "^2.0",
1717
"hhvm/hacktest": "^1.1",
18-
"facebook/fbexpect": "^2.1",
18+
"facebook/fbexpect": "^2.6.1",
1919
"usox/hackttp": "^0.3"
2020
},
2121
"extra": {

tests/RouterCLILookupCodegenBuilderTest.hack

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ final class RouterCLILookupCodegenBuilderTest extends BaseCodegenTestCase {
8181
);
8282
$output = \implode("\n", $output);
8383
expect($exit_code)->toBeGreaterThan(0);
84-
expect($output)->toNotContain('HEAD');
85-
expect($output)->toNotContain('GET');
84+
expect($output)->toNotContainSubstring('HEAD');
85+
expect($output)->toNotContainSubstring('GET');
8686
// Brittle - don't care about this string, just that there's a friendly
8787
// error message rather than a hack error, exception, etc
88-
expect($output)->toContain('No controller found');
88+
expect($output)->toContainSubstring('No controller found');
8989
}
9090
}

tests/RouterCodegenBuilderTest.hack

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ final class RouterCodegenBuilderTest extends BaseCodegenTestCase {
7171

7272
public async function testMapOnlyContainsUsedMethods(): Awaitable<void> {
7373
$code = $this->renderToString(await $this->getBuilderAsync());
74-
expect($code)->toContain('HttpMethod::GET');
75-
expect($code)->toNotContain('HttpMethod::POST');
74+
expect($code)->toContainSubstring('HttpMethod::GET');
75+
expect($code)->toNotContainSubstring('HttpMethod::POST');
7676
}
7777

7878
public async function testDefaultGeneratedFrom(): Awaitable<void> {
7979
$code = $this->renderToString(await $this->getBuilderAsync());
80-
expect($code)->toContain('To re-generate this file run');
81-
expect($code)->toContain('vendor/hhvm/hacktest/bin/hacktest');
80+
expect($code)->toContainSubstring('To re-generate this file run');
81+
expect($code)->toContainSubstring('vendor/hhvm/hacktest/bin/hacktest');
8282
}
8383

8484
public async function testOverriddenGeneratedFrom(): Awaitable<void> {
@@ -87,7 +87,8 @@ final class RouterCodegenBuilderTest extends BaseCodegenTestCase {
8787
$this->getCodegenFactory()->codegenGeneratedFromClass(self::class),
8888
),
8989
);
90-
expect($code)->toContain('Generated from '.RouterCodegenBuilder::class);
90+
expect($code)
91+
->toContainSubstring('Generated from '.RouterCodegenBuilder::class);
9192
}
9293

9394
public async function testCreatesFinalByDefault(): Awaitable<void> {

0 commit comments

Comments
 (0)