Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Fix incorrect brace placement in ExpectObj subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Jul 16, 2019
1 parent 7f47a2a commit 41ef891
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/TestLib/ExpectObj.hack
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@ final class ExpectObj<T> extends \Facebook\FBExpect\ExpectObj<T> {
);
\fwrite(\STDERR, $diff);
}
}
\fwrite(\STDERR, "----- END -----\n");
\stream_set_blocking(\STDERR, false);
\fwrite(\STDERR, "----- END -----\n");
\stream_set_blocking(\STDERR, false);

$recorded = false;
if (\posix_isatty(\STDIN) && \posix_isatty(\STDERR)) {
\fprintf(\STDERR, "Would you like to save this output? [y/N] ");
\stream_set_blocking(\STDIN, true);
$response = Str\trim(\fgets(\STDIN));
\stream_set_blocking(\STDIN, false);
if ($response === 'y') {
\file_put_contents($expect_file, $code);
$recorded = true;
$recorded = false;
if (\posix_isatty(\STDIN) && \posix_isatty(\STDERR)) {
\fprintf(\STDERR, "Would you like to save this output? [y/N] ");
\stream_set_blocking(\STDIN, true);
$response = Str\trim(\fgets(\STDIN));
\stream_set_blocking(\STDIN, false);
if ($response === 'y') {
\file_put_contents($expect_file, $code);
$recorded = true;
}
} else {
throw new \Exception($expect_file.' does not exist');
}
} else {
throw new \Exception($expect_file.' does not exist');
}
$this->toBeSame(\file_get_contents($expect_file));
}
Expand Down

0 comments on commit 41ef891

Please sign in to comment.