File tree Expand file tree Collapse file tree 4 files changed +34
-6
lines changed
Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1212 * none
1313
1414
15+ ## 0.8.1
16+
17+ > * 2020-02-20*
18+
19+ > Description
20+
21+ * Bug fixes:
22+ * fixed browser close
23+ * fixed unit tests
24+ * testing php 7.3 and 7.4
25+
26+
1527## 0.8.0
1628
17- > * 2020-02-20* (not released)
29+ > * 2020-02-20*
1830
1931* Features:
2032 * Added Page::pdf (thanks @tanasecosminromeo )
Original file line number Diff line number Diff line change @@ -99,7 +99,15 @@ public function setPagePreScript(string $script = null)
9999 */
100100 public function close ()
101101 {
102- // TODO check browser.close on chrome 63
102+ $ this ->sendCloseMessage ();
103+ }
104+
105+ /**
106+ * Send close message to the browser
107+ * @throws OperationTimedOut
108+ */
109+ final public function sendCloseMessage ()
110+ {
103111 $ r = $ this ->connection ->sendMessageSync (new Message ('Browser.close ' ));
104112 if (!$ r ->isSuccessful ()) {
105113 // log
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ public function kill()
190190 try {
191191 // log
192192 $ this ->logger ->debug ('process: trying to close chrome gracefully ' );
193- $ this ->browser ->close ();
193+ $ this ->browser ->sendCloseMessage ();
194194 } catch (\Exception $ e ) {
195195 //log
196196 $ this ->logger ->debug ('process: closing chrome gracefully - compatibility ' );
Original file line number Diff line number Diff line change @@ -19,11 +19,19 @@ public static function setUpBeforeClass()
1919
2020 self ::$ process = new Process ([
2121 'php ' ,
22- '-S localhost:8083 ' ,
23- '-t ' . __DIR__ . '/../resources/static-web '
22+ '-S ' ,
23+ 'localhost:8083 ' ,
24+ '-t ' ,
25+ __DIR__ . '/../resources/static-web '
2426 ]);
2527 self ::$ process ->start ();
26- usleep (10000 ); //wait for server to get going
28+ usleep (80000 ); //wait for server to get going
29+
30+ // ensure it started
31+ if (!self ::$ process ->isRunning ()) {
32+ $ message = self ::$ process ->getErrorOutput ();
33+ throw new \Exception ('Cannot start webserver for tests: ' . $ message );
34+ }
2735 }
2836
2937 public static function tearDownAfterClass ()
You can’t perform that action at this time.
0 commit comments