Lines Matching refs:factory

43         $factory = new EncodingFactory();
47 $factory->detect(UTF8::BYTE_ORDER_MARK)
52 $factory->detect(UTF16BE::BYTE_ORDER_MARK)
57 $factory->detect(UTF16LE::BYTE_ORDER_MARK)
63 $factory = new EncodingFactory();
67 $factory->detect("\x000")
72 $factory->detect("0\x00")
78 $factory = new EncodingFactory();
82 $factory->detect("0 HEAD\n1 CHAR MACINTOSH\n0 TRLR")
88 $factory = new EncodingFactory();
92 $factory->detect("0 HEAD\n0 TRLR")
98 $factory = new EncodingFactory();
100 static::assertInstanceOf(UTF8::class, $factory->make(UTF8::NAME));
101 static::assertInstanceOf(UTF16BE::class, $factory->make(UTF16BE::NAME));
102 static::assertInstanceOf(UTF16LE::class, $factory->make(UTF16LE::NAME));
103 static::assertInstanceOf(ANSEL::class, $factory->make(ANSEL::NAME));
104 static::assertInstanceOf(ASCII::class, $factory->make(ASCII::NAME));
105 static::assertInstanceOf(CP437::class, $factory->make(CP437::NAME));
106 static::assertInstanceOf(CP850::class, $factory->make(CP850::NAME));
107 static::assertInstanceOf(Windows1250::class, $factory->make(Windows1250::NAME));
108 static::assertInstanceOf(Windows1251::class, $factory->make(Windows1251::NAME));
109 static::assertInstanceOf(Windows1252::class, $factory->make(Windows1252::NAME));
110 static::assertInstanceOf(MacRoman::class, $factory->make(MacRoman::NAME));
113 $factory->make('Not the name of a valid encoding');
118 $factory = new EncodingFactory();
120 $encodings = $factory->list();
125 static::assertInstanceOf(EncodingInterface::class, $factory->make($key));