<commit_before><?php

namespace React\Tests\Filesystem\Stream;

use React\Filesystem\Stream\StreamFactory;
use React\Tests\Filesystem\TestCase;

class StreamFactoryTest extends TestCase
{

    public function testCreateRead()
    {
        $filesystem = $this->mockAdapter();
        $filesystem
            ->expects($this->once())
            ->method('stat')
            ->with('foo.bar')
            ->will($this->returnValue($this->getMock('React\Promise\PromiseInterface')))
        ;

        $this->assertInstanceOf(
            'React\Filesystem\Stream\ReadableStream',<commit_msg>Return actual promise<commit_after><?php

namespace React\Tests\Filesystem\Stream;

use React\Filesystem\Stream\StreamFactory;
use React\Tests\Filesystem\TestCase;

class StreamFactoryTest extends TestCase
{

    public function testCreateRead()
    {
        $filesystem = $this->mockAdapter();
        $filesystem
            ->expects($this->once())
            ->method('stat')
            ->with('foo.bar')
            ->will($this->returnValue(\React\Promise\resolve([])))
        ;

        $this->assertInstanceOf(
            'React\Filesystem\Stream\ReadableStream',
{'fraction_non_alphanumeric': 0.137221269296741, 'fraction_numerical': 0.0, 'mean_word_length': 2.7284345047923324, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7640623', 'n_tokens_mistral': 319, 'n_tokens_neox': 320, 'n_words': 47}