Ejemplo n.º 1
0
 /**
  * @dataProvider providerGetSetUseBom
  */
 public function testGetSetUseBom($input, $expected)
 {
     $this->assertInstanceOf('CSanquer\\ColibriCsv\\Dialect', $this->dialect->setUseBom($input));
     $this->assertEquals($expected, $this->dialect->getUseBom());
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
0
 /**
  * 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;
 }