Skip to content

Commit

Permalink
fix: pr comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdeme committed Apr 22, 2022
1 parent 1b15faa commit 3bd65f3
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 38 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2021, Stream.io Inc, and individual contributors.
Copyright (c) 2014-2022, Stream.io Inc, and individual contributors.

All rights reserved.

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

## 📝 About Stream

You can sign up for a Stream account at our [Get Started](https://getstream.io/chat/get_started/) page.
You can sign up for a Stream account at our [Get Started](https://getstream.io/activity-feeds/) page.

You can use this library to access chat API endpoints server-side.
You can use this library to access Feeds API endpoints server-side.

For the client-side integrations (web and mobile) have a look at the JavaScript, iOS and Android SDK libraries ([docs](https://getstream.io/chat/)).
For the client-side integrations (web and mobile) have a look at the JavaScript, iOS and Android SDK libraries ([docs](https://getstream.io/activity-feeds/docs/?language=php)).

💡 Note that there is also a higher level [Laravel integration](https://github.com/getstream/stream-laravel) which hooks into the Eloquent ORM.

Expand Down Expand Up @@ -256,6 +256,8 @@ The `stream-laravel` integration helps you to hook into the Laravel's Eloquent O

## ✍️ Contributing

Project is licensed under the [BSD 3-Clause](LICENSE).

We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our [license file](./LICENSE) for more details.

## 🧑‍💻 We are hiring!
Expand Down
11 changes: 1 addition & 10 deletions tests/integration/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

namespace GetStream\Integration;

use DateTime;
use DateTimeZone;
use Firebase\JWT\JWT;
use GetStream\Stream\Client;
use GetStream\Stream\Feed;
use PHPUnit\Framework\TestCase;
use GuzzleHttp\Exception\ClientException;

class CollectionTest extends TestCase
class CollectionTest extends TestBase
{
/**
* @var Client
Expand Down Expand Up @@ -76,11 +72,6 @@ public function cleanUp()
}
}

private function generateGuid()
{
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
}

public function testUpsert()
{
$collection = $this->collections->upsert('animals', [['id' => '1', 'name' => 'bear', 'color' => 'blue']]);
Expand Down
8 changes: 1 addition & 7 deletions tests/integration/FeedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
use Firebase\JWT\JWT;
use GetStream\Stream\Client;
use GetStream\Stream\Feed;
use PHPUnit\Framework\TestCase;

class FeedTest extends TestCase
class FeedTest extends TestBase
{
/**
* @var Client
Expand Down Expand Up @@ -52,11 +51,6 @@ protected function setUp():void
$this->flat3 = $this->client->feed('flat', $this->generateGuid());
}

private function generateGuid()
{
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
}

public function testRedirectUrl()
{
$targetUrl = 'http://google.com/?a=1';
Expand Down
11 changes: 1 addition & 10 deletions tests/integration/ReactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

namespace GetStream\Integration;

use DateTime;
use DateTimeZone;
use Firebase\JWT\JWT;
use GetStream\Stream\Client;
use GetStream\Stream\Feed;
use PHPUnit\Framework\TestCase;

class ReactionTest extends TestCase
class ReactionTest extends TestBase
{
/**
* @var Client
Expand Down Expand Up @@ -72,11 +68,6 @@ protected function setUp():void
$this->reactions = $this->client->reactions();
}

private function generateGuid()
{
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
}

public function testSimpleAddReaction()
{
$reaction = $this->reactions->add('like', $this->activity_id, 'bob');
Expand Down
13 changes: 13 additions & 0 deletions tests/integration/TestBase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace GetStream\Integration;

use PHPUnit\Framework\TestCase;

class TestBase extends TestCase
{
protected function generateGuid()
{
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
}
}
8 changes: 1 addition & 7 deletions tests/integration/UsersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

use GetStream\Stream\Client;
use GetStream\Stream\Feed;
use PHPUnit\Framework\TestCase;

class UserTest extends TestCase
class UserTest extends TestBase
{
/**
* @var Client
Expand Down Expand Up @@ -63,11 +62,6 @@ protected function setUp():void
// $this->user1 = $this->client->feed('user', $this->generateGuid());
}

private function generateGuid()
{
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
}

public function testSimpleAddUser()
{
$uuid = $this->generateGuid();
Expand Down

0 comments on commit 3bd65f3

Please sign in to comment.