public function testHasCommentTag() { $helper = new ColumnHelper(); $column = $this->getMockBuilder(Column::class)->disableOriginalConstructor()->getMock(); $column->expects($this->at(0))->method('getComment')->willReturn(' slkdjflskdj flskdjfl skdjfs ldkf #email'); $column->expects($this->at(1))->method('getComment')->willReturn('#email slkdfjs lkdjfl skdjflsk'); $column->expects($this->at(2))->method('getComment')->willReturn('skdjfls dkjf #email ggg'); $column->expects($this->at(3))->method('getComment')->willReturn('ffemail'); $result = $helper->hasCommentTag($column, 'email'); $this->assertTrue($result); $result = $helper->hasCommentTag($column, 'email'); $this->assertTrue($result); $result = $helper->hasCommentTag($column, 'email'); $this->assertTrue($result); $result = $helper->hasCommentTag($column, 'email'); $this->assertFalse($result); }