Lines Matching refs:Utils
8 use GuzzleHttp\Stream\Utils;
17 $this->assertEquals('foobaz', Utils::copyToString($s));
19 $this->assertEquals('foo', Utils::copyToString($s, 3));
20 $this->assertEquals('baz', Utils::copyToString($s, 3));
21 $this->assertEquals('', Utils::copyToString($s));
32 $result = Utils::copyToString($s1);
40 Utils::copyToStream($s1, $s2);
44 Utils::copyToStream($s1, $s2, 3);
46 Utils::copyToStream($s1, $s2, 3);
55 Utils::copyToStream($s1, $s2);
64 Utils::copyToStream($s1, $s2, 10);
73 Utils::copyToStream($s1, $s2, 10);
80 $this->assertEquals("foo" . PHP_EOL, Utils::readline($s));
81 $this->assertEquals("baz" . PHP_EOL, Utils::readline($s));
82 $this->assertEquals("bar", Utils::readline($s));
88 $this->assertEquals("123", Utils::readline($s, 3));
89 $this->assertEquals("45" . PHP_EOL, Utils::readline($s));
95 $this->assertEquals("foo\tbaz\t\t", Utils::readline($s, null, "\t\t"));
96 $this->assertEquals("bar", Utils::readline($s));
118 $this->assertEquals("h", Utils::readline($s));
124 $this->assertEquals(md5('foobazbar'), Utils::hash($s, 'md5'));
132 Utils::hash($s, 'md5');
139 $this->assertEquals(md5('foobazbar'), Utils::hash($s, 'md5'));
145 $r = Utils::open(__FILE__, 'r');
154 Utils::open('/path/to/does/not/exist', 'r');
159 $this->assertEquals('foo', (string) Utils::create('foo'));