getAbc()); $context = new Context($abc); $this->assertInstanceOf(Context::class, $context); } public function testLoopingThroughLines() { $abc = new StringAtom($this->getAbc()); $context = new Context($abc); $this->assertGreaterThan(1, count($context)); foreach ($context as $key => $line) { $this->assertInternalType('string', $line); } } public function testGetStateDefaultsToNoData() { $abc = new StringAtom($this->getAbc()); $context = new Context($abc); $result = $context->getState(); $this->assertEquals(Context::MODE_NO_DATA, $result); } public function testSetStateInFileHeader() { $abc = new StringAtom($this->getAbc()); $context = new Context($abc); $result = $context->setStateInFileHeader()->getState(); $this->assertEquals(Context::MODE_FILE_HEADER, $result); } public function testGetVersionReturnsDefault() { $expected = Context::ABC_VERSION_DEFAULT; $abc = new StringAtom($this->getAbc()); $context = new Context($abc); $result = $context->getVersion(); $this->assertEquals($expected, $result); } }