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