File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types = 1 );
4+
5+ namespace Ock \Testing ;
6+
7+ trait IsRecordingTrait {
8+
9+ /**
10+ * Checks whether the test runs in "recording" mode.
11+ *
12+ * @return bool
13+ * TRUE if the test runs in "recording" mode.
14+ */
15+ protected function isRecording (): bool {
16+ return !!\getenv ('UPDATE_TESTS ' );
17+ }
18+
19+ }
Original file line number Diff line number Diff line change 3030 */
3131trait RecordedTestTrait {
3232
33- private ? AssertionRecorderInterface $ recorder = null ;
33+ use IsRecordingTrait ;
3434
35- /**
36- * Checks whether the test runs in "recording" mode.
37- *
38- * @return bool
39- * TRUE if the test runs in "recording" mode.
40- */
41- protected function isRecording (): bool {
42- return !!\getenv ('UPDATE_TESTS ' );
43- }
35+ private ?AssertionRecorderInterface $ recorder = null ;
4436
4537 /**
4638 * Asserts that an array of objects is as recorded.
You can’t perform that action at this time.
0 commit comments