/** * @dataProvider providerGetSetUseBom */ public function testGetSetUseBom($input, $expected) { $this->assertInstanceOf('CSanquer\\ColibriCsv\\Dialect', $this->dialect->setUseBom($input)); $this->assertEquals($expected, $this->dialect->getUseBom()); }
/** * Remove BOM in the provided string * * @param string $str * @return string */ protected function removeBom($str) { return $str !== false && $this->dialect->getUseBom() ? str_replace("", '', $str) : $str; }
/** * Remove BOM in the provided string * * @param string $str * @return string */ protected function removeBom($str) { return $str !== false && $this->dialect->getUseBom() ? str_replace($this->transcoder->getBOM($this->dialect->getEncoding()), '', $str) : $str; }