55use Aws \S3 \S3Client ;
66use Behat \Behat \Hook \Scope \AfterFeatureScope ;
77use Behat \Behat \Hook \Scope \BeforeFeatureScope ;
8- use Behat \Behat \Tester \Exception \PendingException ;
98use Behat \Behat \Context \Context ;
109use Behat \Behat \Context \SnippetAcceptingContext ;
11- use Behat \Gherkin \Node \PyStringNode ;
12- use Behat \Gherkin \Node \TableNode ;
1310use PHPUnit \Framework \Assert ;
14- use PHPUnit \Framework \TestCase ;
1511
1612/**
1713 * Defines application features from the specific context.
1814 */
19- class NativeStreamContext extends TestCase implements
15+ class NativeStreamContext implements
2016 Context,
2117 SnippetAcceptingContext
2218{
@@ -108,7 +104,7 @@ public function iCallOnThePath($method, $path)
108104 */
109105 public function theCallShouldReturn ($ booleanString )
110106 {
111- $ this -> assertSame (
107+ Assert:: assertSame (
112108 filter_var ($ booleanString , FILTER_VALIDATE_BOOLEAN ),
113109 $ this ->callSucceeded
114110 );
@@ -119,7 +115,7 @@ public function theCallShouldReturn($booleanString)
119115 */
120116 public function iHaveAFileAtWithTheContent ($ path , $ contents )
121117 {
122- $ this -> assertGreaterThan (
118+ Assert:: assertGreaterThan (
123119 0 ,
124120 file_put_contents ($ this ->getS3Path ($ path ), $ contents )
125121 );
@@ -130,15 +126,15 @@ public function iHaveAFileAtWithTheContent($path, $contents)
130126 */
131127 public function iHaveAFileAtWithNoContent ($ path )
132128 {
133- $ this -> assertSame (0 , file_put_contents ($ this ->getS3Path ($ path ), '' ));
129+ Assert:: assertSame (0 , file_put_contents ($ this ->getS3Path ($ path ), '' ));
134130 }
135131
136132 /**
137133 * @Then the file at :arg1 should contain :arg2
138134 */
139135 public function theFileAtShouldContain ($ key , $ contents )
140136 {
141- $ this -> assertStringEqualsFile ($ this ->getS3Path ($ key ), $ contents );
137+ Assert:: assertStringEqualsFile ($ this ->getS3Path ($ key ), $ contents );
142138 }
143139
144140 /**
@@ -154,23 +150,23 @@ public function iHaveAReadHandleOnTheFileAt($key)
154150 */
155151 public function readingBytesShouldReturn ($ byteCount , $ expected )
156152 {
157- $ this -> assertSame ($ expected , fread ($ this ->handle , $ byteCount ));
153+ Assert:: assertSame ($ expected , fread ($ this ->handle , $ byteCount ));
158154 }
159155
160156 /**
161157 * @Then /^calling fstat should report a size of (\d+)$/
162158 */
163159 public function callingFstatShouldReportASizeOf ($ size )
164160 {
165- $ this -> assertSame ((int ) $ size , fstat ($ this ->handle )['size ' ]);
161+ Assert:: assertSame ((int ) $ size , fstat ($ this ->handle )['size ' ]);
166162 }
167163
168164 /**
169165 * @Then scanning the directory at :dir should return a list with one member named :file
170166 */
171167 public function scanningTheDirectoryAtShouldReturnAListWithOneMemberNamed ($ dir , $ file )
172168 {
173- $ this -> assertSame ([$ file ], scandir ($ this ->getS3Path ($ dir )));
169+ Assert:: assertSame ([$ file ], scandir ($ this ->getS3Path ($ dir )));
174170 }
175171
176172 private function getS3Path ($ path )
0 commit comments