1 | <?php |
||
11 | class Stream extends Utils\AbstractAssert |
||
12 | { |
||
13 | /** |
||
14 | * @var StreamInterface |
||
15 | */ |
||
16 | protected $stream; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $string; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | * |
||
26 | * @param StreamInterface $stream |
||
27 | * @param AbstractAssert|null $previous |
||
28 | */ |
||
29 | public function __construct(StreamInterface $stream, Utils\AbstractAssert $previous = null) |
||
35 | |||
36 | /** |
||
37 | * Asserts that the stream has a specific size. |
||
38 | * |
||
39 | * @param int $size |
||
40 | * @param string $message |
||
41 | * |
||
42 | * @return self |
||
43 | */ |
||
44 | public function size($size, $message = '') |
||
48 | |||
49 | /** |
||
50 | * Asserts that the stream is seekable. |
||
51 | * |
||
52 | * @param string $message |
||
53 | * |
||
54 | * @return self |
||
55 | */ |
||
56 | public function isSeekable($message = '') |
||
60 | |||
61 | /** |
||
62 | * Asserts that the stream is not seekable. |
||
63 | * |
||
64 | * @param string $message |
||
65 | * |
||
66 | * @return self |
||
67 | */ |
||
68 | public function isNotSeekable($message = '') |
||
72 | |||
73 | /** |
||
74 | * Asserts that the stream is writable. |
||
75 | * |
||
76 | * @param string $message |
||
77 | * |
||
78 | * @return self |
||
79 | */ |
||
80 | public function isWritable($message = '') |
||
84 | |||
85 | /** |
||
86 | * Asserts that the stream is not writable. |
||
87 | * |
||
88 | * @param string $message |
||
89 | * |
||
90 | * @return self |
||
91 | */ |
||
92 | public function isNotWritable($message = '') |
||
96 | |||
97 | /** |
||
98 | * Asserts that the stream is readable. |
||
99 | * |
||
100 | * @param string $message |
||
101 | * |
||
102 | * @return self |
||
103 | */ |
||
104 | public function isReadable($message = '') |
||
108 | |||
109 | /** |
||
110 | * Asserts that the stream is readable. |
||
111 | * |
||
112 | * @param string $message |
||
113 | * |
||
114 | * @return self |
||
115 | */ |
||
116 | public function isNotReadable($message = '') |
||
120 | |||
121 | /** |
||
122 | * Creates an instance of Html to execute assertions with the html code. |
||
123 | * |
||
124 | * @return Html |
||
125 | */ |
||
126 | public function assertHtml() |
||
130 | } |
||
131 |