File tree Expand file tree Collapse file tree
user_guide_src/source/installation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,12 +141,13 @@ The way error and output streams are captured has changed. Now instead of::
141141 protected function setUp(): void
142142 {
143143 CITestStreamFilter::$buffer = '';
144- $this->stream_filter = stream_filter_append(STDOUT, 'CITestStreamFilter');
144+ $this->streamFilter = stream_filter_append(STDOUT, 'CITestStreamFilter');
145+ $this->streamFilter = stream_filter_append(STDERR, 'CITestStreamFilter');
145146 }
146147
147148 protected function tearDown(): void
148149 {
149- stream_filter_remove($this->stream_filter );
150+ stream_filter_remove($this->streamFilter );
150151 }
151152
152153need to use::
@@ -157,11 +158,13 @@ need to use::
157158 {
158159 CITestStreamFilter::registration();
159160 CITestStreamFilter::addOutputFilter();
161+ CITestStreamFilter::addErrorFilter();
160162 }
161163
162164 protected function tearDown(): void
163165 {
164166 CITestStreamFilter::removeOutputFilter();
167+ CITestStreamFilter::removeErrorFilter();
165168 }
166169
167170Or use the trait ``CodeIgniter\Test\StreamFilterTrait ``. See :ref: `testing-cli-output `.
You can’t perform that action at this time.
0 commit comments